3.10.4 \(\int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx\) [904]

Optimal. Leaf size=88 \[ -\frac {4 i c^3 (a+i a \tan (e+f x))^5}{5 f}+\frac {2 i c^3 (a+i a \tan (e+f x))^6}{3 a f}-\frac {i c^3 (a+i a \tan (e+f x))^7}{7 a^2 f} \]

[Out]

-4/5*I*c^3*(a+I*a*tan(f*x+e))^5/f+2/3*I*c^3*(a+I*a*tan(f*x+e))^6/a/f-1/7*I*c^3*(a+I*a*tan(f*x+e))^7/a^2/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \begin {gather*} -\frac {i c^3 (a+i a \tan (e+f x))^7}{7 a^2 f}+\frac {2 i c^3 (a+i a \tan (e+f x))^6}{3 a f}-\frac {4 i c^3 (a+i a \tan (e+f x))^5}{5 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(((-4*I)/5)*c^3*(a + I*a*Tan[e + f*x])^5)/f + (((2*I)/3)*c^3*(a + I*a*Tan[e + f*x])^6)/(a*f) - ((I/7)*c^3*(a +
 I*a*Tan[e + f*x])^7)/(a^2*f)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 3603

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^5 (c-i c \tan (e+f x))^3 \, dx &=\left (a^3 c^3\right ) \int \sec ^6(e+f x) (a+i a \tan (e+f x))^2 \, dx\\ &=-\frac {\left (i c^3\right ) \text {Subst}\left (\int (a-x)^2 (a+x)^4 \, dx,x,i a \tan (e+f x)\right )}{a^2 f}\\ &=-\frac {\left (i c^3\right ) \text {Subst}\left (\int \left (4 a^2 (a+x)^4-4 a (a+x)^5+(a+x)^6\right ) \, dx,x,i a \tan (e+f x)\right )}{a^2 f}\\ &=-\frac {4 i c^3 (a+i a \tan (e+f x))^5}{5 f}+\frac {2 i c^3 (a+i a \tan (e+f x))^6}{3 a f}-\frac {i c^3 (a+i a \tan (e+f x))^7}{7 a^2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.34, size = 93, normalized size = 1.06 \begin {gather*} \frac {a^5 c^3 \sec (e) \sec ^7(e+f x) (35 i \cos (f x)+35 i \cos (2 e+f x)+35 \sin (f x)-35 \sin (2 e+f x)+42 \sin (2 e+3 f x)+14 \sin (4 e+5 f x)+2 \sin (6 e+7 f x))}{210 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^5*(c - I*c*Tan[e + f*x])^3,x]

[Out]

(a^5*c^3*Sec[e]*Sec[e + f*x]^7*((35*I)*Cos[f*x] + (35*I)*Cos[2*e + f*x] + 35*Sin[f*x] - 35*Sin[2*e + f*x] + 42
*Sin[2*e + 3*f*x] + 14*Sin[4*e + 5*f*x] + 2*Sin[6*e + 7*f*x]))/(210*f)

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 81, normalized size = 0.92

method result size
risch \(\frac {128 i a^{5} c^{3} \left (35 \,{\mathrm e}^{8 i \left (f x +e \right )}+35 \,{\mathrm e}^{6 i \left (f x +e \right )}+21 \,{\mathrm e}^{4 i \left (f x +e \right )}+7 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) \(72\)
derivativedivides \(\frac {a^{5} c^{3} \left (\tan \left (f x +e \right )-\frac {\left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {i \left (\tan ^{6}\left (f x +e \right )\right )}{3}-\frac {\left (\tan ^{5}\left (f x +e \right )\right )}{5}+i \left (\tan ^{4}\left (f x +e \right )\right )+\frac {\left (\tan ^{3}\left (f x +e \right )\right )}{3}+i \left (\tan ^{2}\left (f x +e \right )\right )\right )}{f}\) \(81\)
default \(\frac {a^{5} c^{3} \left (\tan \left (f x +e \right )-\frac {\left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {i \left (\tan ^{6}\left (f x +e \right )\right )}{3}-\frac {\left (\tan ^{5}\left (f x +e \right )\right )}{5}+i \left (\tan ^{4}\left (f x +e \right )\right )+\frac {\left (\tan ^{3}\left (f x +e \right )\right )}{3}+i \left (\tan ^{2}\left (f x +e \right )\right )\right )}{f}\) \(81\)
norman \(\frac {a^{5} c^{3} \tan \left (f x +e \right )}{f}+\frac {i a^{5} c^{3} \left (\tan ^{2}\left (f x +e \right )\right )}{f}+\frac {i a^{5} c^{3} \left (\tan ^{4}\left (f x +e \right )\right )}{f}+\frac {a^{5} c^{3} \left (\tan ^{3}\left (f x +e \right )\right )}{3 f}-\frac {a^{5} c^{3} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}-\frac {a^{5} c^{3} \left (\tan ^{7}\left (f x +e \right )\right )}{7 f}+\frac {i a^{5} c^{3} \left (\tan ^{6}\left (f x +e \right )\right )}{3 f}\) \(135\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f*a^5*c^3*(tan(f*x+e)-1/7*tan(f*x+e)^7+1/3*I*tan(f*x+e)^6-1/5*tan(f*x+e)^5+I*tan(f*x+e)^4+1/3*tan(f*x+e)^3+I
*tan(f*x+e)^2)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 123, normalized size = 1.40 \begin {gather*} -\frac {15 \, a^{5} c^{3} \tan \left (f x + e\right )^{7} - 35 i \, a^{5} c^{3} \tan \left (f x + e\right )^{6} + 21 \, a^{5} c^{3} \tan \left (f x + e\right )^{5} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{4} - 35 \, a^{5} c^{3} \tan \left (f x + e\right )^{3} - 105 i \, a^{5} c^{3} \tan \left (f x + e\right )^{2} - 105 \, a^{5} c^{3} \tan \left (f x + e\right )}{105 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

-1/105*(15*a^5*c^3*tan(f*x + e)^7 - 35*I*a^5*c^3*tan(f*x + e)^6 + 21*a^5*c^3*tan(f*x + e)^5 - 105*I*a^5*c^3*ta
n(f*x + e)^4 - 35*a^5*c^3*tan(f*x + e)^3 - 105*I*a^5*c^3*tan(f*x + e)^2 - 105*a^5*c^3*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 177 vs. \(2 (73) = 146\).
time = 0.92, size = 177, normalized size = 2.01 \begin {gather*} -\frac {128 \, {\left (-35 i \, a^{5} c^{3} e^{\left (8 i \, f x + 8 i \, e\right )} - 35 i \, a^{5} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} - 21 i \, a^{5} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 7 i \, a^{5} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5} c^{3}\right )}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

-128/105*(-35*I*a^5*c^3*e^(8*I*f*x + 8*I*e) - 35*I*a^5*c^3*e^(6*I*f*x + 6*I*e) - 21*I*a^5*c^3*e^(4*I*f*x + 4*I
*e) - 7*I*a^5*c^3*e^(2*I*f*x + 2*I*e) - I*a^5*c^3)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f
*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*
e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (73) = 146\).
time = 0.52, size = 245, normalized size = 2.78 \begin {gather*} \frac {4480 i a^{5} c^{3} e^{8 i e} e^{8 i f x} + 4480 i a^{5} c^{3} e^{6 i e} e^{6 i f x} + 2688 i a^{5} c^{3} e^{4 i e} e^{4 i f x} + 896 i a^{5} c^{3} e^{2 i e} e^{2 i f x} + 128 i a^{5} c^{3}}{105 f e^{14 i e} e^{14 i f x} + 735 f e^{12 i e} e^{12 i f x} + 2205 f e^{10 i e} e^{10 i f x} + 3675 f e^{8 i e} e^{8 i f x} + 3675 f e^{6 i e} e^{6 i f x} + 2205 f e^{4 i e} e^{4 i f x} + 735 f e^{2 i e} e^{2 i f x} + 105 f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**5*(c-I*c*tan(f*x+e))**3,x)

[Out]

(4480*I*a**5*c**3*exp(8*I*e)*exp(8*I*f*x) + 4480*I*a**5*c**3*exp(6*I*e)*exp(6*I*f*x) + 2688*I*a**5*c**3*exp(4*
I*e)*exp(4*I*f*x) + 896*I*a**5*c**3*exp(2*I*e)*exp(2*I*f*x) + 128*I*a**5*c**3)/(105*f*exp(14*I*e)*exp(14*I*f*x
) + 735*f*exp(12*I*e)*exp(12*I*f*x) + 2205*f*exp(10*I*e)*exp(10*I*f*x) + 3675*f*exp(8*I*e)*exp(8*I*f*x) + 3675
*f*exp(6*I*e)*exp(6*I*f*x) + 2205*f*exp(4*I*e)*exp(4*I*f*x) + 735*f*exp(2*I*e)*exp(2*I*f*x) + 105*f)

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 177 vs. \(2 (73) = 146\).
time = 0.89, size = 177, normalized size = 2.01 \begin {gather*} -\frac {128 \, {\left (-35 i \, a^{5} c^{3} e^{\left (8 i \, f x + 8 i \, e\right )} - 35 i \, a^{5} c^{3} e^{\left (6 i \, f x + 6 i \, e\right )} - 21 i \, a^{5} c^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 7 i \, a^{5} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5} c^{3}\right )}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^5*(c-I*c*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-128/105*(-35*I*a^5*c^3*e^(8*I*f*x + 8*I*e) - 35*I*a^5*c^3*e^(6*I*f*x + 6*I*e) - 21*I*a^5*c^3*e^(4*I*f*x + 4*I
*e) - 7*I*a^5*c^3*e^(2*I*f*x + 2*I*e) - I*a^5*c^3)/(f*e^(14*I*f*x + 14*I*e) + 7*f*e^(12*I*f*x + 12*I*e) + 21*f
*e^(10*I*f*x + 10*I*e) + 35*f*e^(8*I*f*x + 8*I*e) + 35*f*e^(6*I*f*x + 6*I*e) + 21*f*e^(4*I*f*x + 4*I*e) + 7*f*
e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Mupad [B]
time = 4.90, size = 96, normalized size = 1.09 \begin {gather*} \frac {a^5\,c^3\,\left (-{\cos \left (e+f\,x\right )}^7\,35{}\mathrm {i}+64\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^6+32\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^4+24\,\sin \left (e+f\,x\right )\,{\cos \left (e+f\,x\right )}^2+\cos \left (e+f\,x\right )\,35{}\mathrm {i}-15\,\sin \left (e+f\,x\right )\right )}{105\,f\,{\cos \left (e+f\,x\right )}^7} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^5*(c - c*tan(e + f*x)*1i)^3,x)

[Out]

(a^5*c^3*(cos(e + f*x)*35i - 15*sin(e + f*x) + 24*cos(e + f*x)^2*sin(e + f*x) + 32*cos(e + f*x)^4*sin(e + f*x)
 + 64*cos(e + f*x)^6*sin(e + f*x) - cos(e + f*x)^7*35i))/(105*f*cos(e + f*x)^7)

________________________________________________________________________________________